#ifndef _stm32_uart_config_
#define _stm32_uart_config_

#include "usart_init_stm32cube.h"

#define 		_HAL_LIBRARY_



#ifdef  	_HAL_LIBRARY_
#define 		_GetUartParity(a)			((a == _Parity_AppDef_Even_)?UART_PARITY_EVEN:((a ==_Parity_AppDef_Odd_)?UART_PARITY_ODD:UART_PARITY_NONE))
#define 		_GetUartStopBitLen(a)			((a == _StopBit_AppDef_2_)? UART_STOPBITS_2:UART_STOPBITS_1)
#define 		_GetUartWordLength(a)			(( a ==_Parity_AppDef_Null_)?UART_WORDLENGTH_8B:UART_WORDLENGTH_9B)

#else

#define 		_GetUartParity(a)			((a == _Parity_AppDef_Even_)?USART_Parity_Even:((a ==_Parity_AppDef_Odd_)?USART_Parity_Odd:USART_Parity_No))
#define 		_GetUartStopBitLen(a)			((a == _StopBit_AppDef_2_)? USART_StopBits_2:USART_StopBits_1)
#define 		_GetUartWordLength(a)			(( a ==_Parity_AppDef_Null_)?USART_WordLength_8b:USART_WordLength_9b)
#endif



#endif
